Merge "rdbms: make LBFactory close/rollback dangling handles like LoadBalancer"
[lhc/web/wiklou.git] / includes / specials / SpecialWatchlist.php
index 1ef11b5..f5239b4 100644 (file)
@@ -382,7 +382,10 @@ class SpecialWatchlist extends ChangesListSpecialPage {
                // the necessary rights.
                if ( !$user->isAllowed( 'deletedhistory' ) ) {
                        $bitmask = LogPage::DELETED_ACTION;
-               } elseif ( !$user->isAllowedAny( 'suppressrevision', 'viewsuppressed' ) ) {
+               } elseif ( !MediaWikiServices::getInstance()
+                       ->getPermissionManager()
+                       ->userHasAnyRight( $user, 'suppressrevision', 'viewsuppressed' )
+               ) {
                        $bitmask = LogPage::DELETED_ACTION | LogPage::DELETED_RESTRICTED;
                } else {
                        $bitmask = 0;
@@ -554,6 +557,9 @@ class SpecialWatchlist extends ChangesListSpecialPage {
                                $rc->numberofWatchingusers = 0;
                        }
 
+                       // XXX: this treats pages with no unseen changes as "not on the watchlist" since
+                       // everything is on the watchlist and it is an easy way to make pages with unseen
+                       // changes appear bold. @TODO: clean this up.
                        $changeLine = $list->recentChangesLine( $rc, $unseen, $counter );
                        if ( $changeLine !== false ) {
                                $s .= $changeLine;
@@ -877,7 +883,7 @@ class SpecialWatchlist extends ChangesListSpecialPage {
        private function getLatestNotificationTimestamp( RecentChange $rc ) {
                return $this->watchStore->getLatestNotificationTimestamp(
                        $rc->getAttribute( 'wl_notificationtimestamp' ),
-                       $rc->getPerformer(),
+                       $this->getUser(),
                        $rc->getTitle()
                );
        }